const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
module.exports = {
  configureWebpack: {
    plugins: [
      new BundleAnalyzerPlugin()
    ]
  },
  devServer: {
    port: 8809,
    proxy: {
      '/api': {
        changeOrigin: true,
        target: 'http://47.106.23.108:8020/',
        // target: 'https://www.easy-mock.com/mock/5b475a16e23b89785a7aa611/example/',
        pathRewrite: {
          '^/api': '/api'
        }
      },
      '/facepp': {
        changeOrigin: true,
        target: 'https://api-cn.faceplusplus.com/',
        // target: 'https://www.easy-mock.com/mock/5b475a16e23b89785a7aa611/example/',
        pathRewrite: {
          '^/facepp': '/facepp'
        }
      }
    }
  }
}
